<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TuanFavorites extends Model
{
    public $timestamps = false;

    protected $table = 'tuan_favorites';

    protected $primaryKey = 'favorites_id';

    protected $fillable = [
        'favorites_id',
        'user_id',
        'tuan_id',
        'closed', //是否收藏 1是 2否
        'create_time',
        'create_ip',
    ];

    //关联团购
    public function tuan_info()
    {
        return $this->hasOne('App\\Models\\TuanInfo', 'tuan_id', 'tuan_id');
    }
}
